	package com.apexedu.eas.dao;
	

import java.io.Serializable;
import java.util.List;
import java.util.Map;

import com.apexedu.framework.util.Pager;
/**
 * 定义所有DAO接口的父接口，用以提供一些通用的方法，并通过泛型实现一些DAO的通用功能 该接口继承自appfuse框架的GenericDao接口
 * 自定义DAO接口是，要继承该DAO，使用示例: UserDao extends BaseDao<User, Integer> { ... }
 * 
 */
public interface IBaseDao<T,PK extends Serializable> {


    /**
     * The <code>add(T entity)</code> method is add object to database.
     * 
     * @param entity
     *            if you want to add entity.
     * 
     * @throws HibernateDaoSupportException
     *             when accessing and
     *             manipulating database happen exception.
     */
    public PK add(T entity);

    /**
     * The <code>delete(T entity)</code> method is delete object to database.
     * 
     * @param entity
     *            if you want to delete entity.
     * 
     * @throws HibernateDaoSupportException
     *             when accessing and
     *             manipulating database happen exception.
     */
    public void delete(T entity);

    /**
     * The <code>modifty(T entity)</code> method is update object to database.
     * 
     * @param entity
     *            if you want to update entity.
     * @throws HibernateDaoSupportException
     *             when accessing and
     *             manipulating database happen exception.
     */
    public void modify(T entity);
    
   // public void save(T entity);
    

}
